programming4us
           
 
 
Programming

Microsoft Visual Studio 2010 : Reports and Debugging - Using the Parallel Stacks Window

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/8/2013 3:47:53 AM

The Parallel Stacks window displays a call stack from the perspective of parallel execution. Similar to the Threads and Call Stack windows, the Parallel Tasks and Parallel Stacks windows are frequently used together.

There are two views of the Parallel Stacks window: Threads view and Tasks view. In the TPL, a task is the encapsulation of a parallel operation. This is the reason developers focus on tasks when developing a parallel application—threads are largely abstracted. However, when things go wrong, information on threads is often helpful. For example, knowing which threads share the same call stack can be useful. For this reason, the Parallel Stacks window has both a Threads view and a Tasks view. You can select the desired view in the drop-down list at the top of the Parallel Stacks window.

The Threads View

The Threads view of the Parallel Stacks window shows the call path of threads through concurrent code. Each thread represents a separate path of execution. Call stacks are represented as nodes or boxes in the window. Each node lists methods of the call stack. The current stack frame is highlighted with a yellow arrow, and a white arrow (if any) indicates the stack frame in which execution was interrupted by the debugger. The current path through the application is shown with a bold blue arrow line. The status of a thread is shown above the call stack in the terminating node. On the left side of the window, you can use the Zoom slider control to scale the window.

The Threads View

There are a few method icons:

  • Yellow arrow . The active stack frame for the current thread

  • Green arrow . The active stack frame for a noncurrent thread

  • Cloths thread icon (two squiggly lines) . The active stack frame for a noncurrent call stack

    Cloths thread icon (two squiggly lines)

You can switch the current stack frame by double-clicking one of the noncurrent frames. This changes the context for many things, such as the local variables.

Some threads can follow the same path and share a common call stack. When that occurs, that node is shared by multiple threads, as annotated in the node header. In the diagram at the beginning of this section, two threads share the {MG, MH, MI} class stack. If you want to identify the specific threads, you can point to the header. A tooltip appears that displays the thread identifier and type for each thread, as shown in the next image.

Cloths thread icon (two squiggly lines)

The preceding diagram depicts two threads sharing a call stack. Afterward, the threads deviate. One thread calls the XClass.MJ method, while the other calls XClass.MK. You can point to the header for the nodes to identify the specific threads.

Cloths thread icon (two squiggly lines)

Obviously, pointing can be helpful in a variety of ways. For example, when you point to a method in the call stack, the tooltip displays the stack frame for each of the concurrent threads. In addition to the thread identifier, the display includes parameters and source line information. The stack frame for the current thread appears in bold (when multiple threads are running through this particular call stack, as shown here).

Cloths thread icon (two squiggly lines)

The Threads view has a toolbar that offers various commands.

Cloths thread icon (two squiggly lines)

From left to right, here’s an explanation of the toolbar buttons:

  • View drop-down list . Toggles between the Threads view and the Tasks view

  • Stack frames . Shows stack frames for threads flagged in the Threads window

  • Method view . Shows the callers and callees of the current method

  • Auto Scroll To Current Stack Frame . Scrolls to bring the current stack frame into the visible window

  • Toggle Zoom Control . Toggles the Zoom slider control between visible and non-visible

You can right-click any method in the call stack to open a context menu, as shown in the following image.

Toggle Zoom Control

The context menu commands are as follows:

  • Switch to Frame . Selects the current method as the active stack frame

  • Go To Task . In the Tasks view, shows the task for this method

  • Go To Source Code . Jumps to the source code for a particular method

  • Go To Disassembly . Opens the disassembly for a particular method

  • Show External Code . Displays external code that is not in your code

  • Hexadecimal Display . Switches between hexadecimal and decimal numbers

  • Symbol Load Information . Displays the status of symbols for this method

  • Symbol Settings . Allows you to configure symbol information

The Bird’s Eye View is a super cool feature. You can pan a reduced version of the graph within a miniature window. This is useful if you have a large diagram and want to quickly view a non-visible area. The Bird’s Eye View button is at the intersection of the right and bottom toolbars. When you click the button, an insert appears that contains the diagram. The shaded area is your view. Click and drag within the Bird’s Eye view to reposition the diagram. If the diagram is entirely visible, neither the scrollbars nor the Bird’s Eye View button appear.

Symbol Settings

The Tasks View

The Tasks view shows the call stack of tasks and is the other view available in the Parallel Stacks window. In general, this view presents the application from the perspective of tasks and removes other extraneous information. It shows the call path of tasks, where each node is an individual call stack. The current path is highlighted with a bold blue arrow. All this should sound familiar at this point, because for ease of use, the Threads and Tasks views are similar.

Here is the Tasks view.

The Tasks View

The preceding diagram shows five tasks. Two threads execute on the same call stack, which is {MI, MH, MG}. One of the tasks then calls MJ. The other task calls MK. Three threads share the {MC, MB, MA} call stack before separating paths. If you point to a node header, you will display a tooltip with information on each task in the call stack. If you point to the header with three tasks, here’s what is displayed:

The Tasks View

Within a node, you can point to a specific method. A tooltip appears that provides the frame number, the full symbol name, the parameters, and source line information, as shown next.

The Tasks View

The active stack frame of the current task is highlighted with a yellow arrow. In general, the same arrows and other icons are available as in the Threads view—but they apply to tasks rather than threads.

The end node of each call path includes the task status in the header, shown as an icon. In the following end node, the red circle with a dash indicates a deadlock. As in other examples, you can point to the task header for more detail, as shown here.

The Tasks View
Other -----------------
- Microsoft Visual Studio 2010 : Reports and Debugging - Using the Parallel Tasks Window
- Microsoft Visual Studio 2010 : Debugging with Visual Studio 2010 (part 2) - Debugging Threads
- Microsoft Visual Studio 2010 : Debugging with Visual Studio 2010 (part 1) - Live Debugging, Performing Post-Mortem Analysis
- .NET Components : Serialization and Class Hierarchies (part 2) - Manual Base-Class Serialization
- .NET Components : Serialization and Class Hierarchies (part 1) - Custom Serialization and Base Classes
- .NET Components : Custom Serialization (part 2) - Constraining Serialization
- .NET Components : Custom Serialization (part 1) - The ISerializable Interface, Implementing ISerializable
- .NET Components : Serialization and Streams - Serializing Multiple Objects
- Microsoft ASP.NET 3.5 : Writing HTTP Handlers (part 5) - Advanced HTTP Handler Programming
- Microsoft ASP.NET 3.5 : Writing HTTP Handlers (part 4) - Serving Images More Effectively
- Microsoft ASP.NET 3.5 : Writing HTTP Handlers (part 3) - The Picture Viewer Handler
- Microsoft ASP.NET 3.5 : Writing HTTP Handlers (part 2) - An HTTP Handler for Quick Data Reports
- Microsoft ASP.NET 3.5 : Writing HTTP Handlers (part 1) - The IHttpHandler Interface
- Microsoft ASP.NET 3.5 : HTTP Handlers and Modules - Quick Overview of the IIS Extensibility API
- Programming WCF Services : Queued Services - The HTTP Bridge
- Microsoft ASP.NET 4 : Ajax - Extender Controls (part 2) - A Modal Pop-up Dialog-Style Component
- Microsoft ASP.NET 4 : Ajax - Extender Controls (part 1) - The AutoComplete Extender
- Mobile Handheld Devices : DATA SYNCHRONIZATION
- Mobile Handheld Devices : MEMORY, STORAGE AND BATTERIES
- LINQ to Objects : How to Return Elements When the Result Is a Sequence (Select Many)
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us